<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->id();
            //订单号
            $table->string('order_number', 255)->unique();
            //姓名
            $table->string('name', 100);
            //电话
            $table->string('phone', 20);
            //邮箱
            $table->string('email', 100)->nullable();
            //邮编
            $table->string('postal_code', 20)->nullable();
            //国家
            $table->string('country', 100)->nullable();
            //省份
            $table->string('province', 100)->nullable();
            //详细地址
            $table->string('address', 800)->nullable();
            //备注
            $table->string('remark',800)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orders');
    }
};
